Skip to content

Expose quote preservation and entity decoding in the CLI - #240

Open
ac1982 wants to merge 1 commit into
rspeer:mainfrom
ac1982:feat/cli-quote-entity-options
Open

ac1982 wants to merge 1 commit into
rspeer:mainfrom
ac1982:feat/cli-quote-entity-options

Conversation

@ac1982

@ac1982 ac1982 commented Oct 19, 2026

Copy link
Copy Markdown

Closes #185.

The CLI currently cannot preserve curly quotes or force HTML entity decoding in text containing <, although TextFixerConfig supports both. Add --preserve-quotes and --unescape-entities, passing them through the existing configuration to fix_file. Other fixes still run, and default behavior is unchanged. The existing --preserve-entities option remains available; argparse rejects combining the two entity options before opening the output file.

Tests run the installed CLI through stdin/stdout and file input/output, including multiline HTML, mojibake, combined options and conflicting options. Before the change, 9 new acceptance cases failed. Afterward, all 349 tests passed with 10 existing xfails; Ruff checks and the Sphinx build with warnings treated as errors passed. Tested on Linux ARM64 with Python 3.12.

AI assistance: OpenAI Codex implemented and locally verified this change. The project's existing authorship and license attribution are preserved.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: More config arguments for CLI version

1 participant